<project name="artifacts" basedir="." default="build">
	<property file="../oshi.properties" />
    <property name="artifacts.dir" location="../dist" />
    <target name="gather-artifacts">    	
        <delete dir="${artifacts.dir}" quiet="true"/>
        <mkdir dir="${artifacts.dir}" />
    	<copy tofile="${artifacts.dir}/license.html" file="../epl-v10.html" />
        <mkdir dir="${artifacts.dir}/bin" />
    	<copy todir="${artifacts.dir}/bin">
    		<fileset dir="../oshi-core/build" includes="*.jar" />
    		<fileset dir="../thirdparty/jna" includes="*.jar" />
    	</copy>
        <mkdir dir="${artifacts.dir}/doc" />
    	<copy todir="${artifacts.dir}/doc">
    		<fileset dir="../oshi-core/doc" />
    	</copy>
        <echo message="================ Done: ${artifacts.dir} ================"/>
    </target>
	<target name="zip-artifacts">
		<zip basedir="${artifacts.dir}" destfile="${artifacts.dir}/oshi-${oshi.version}.zip" 
			excludes="${artifacts.dir}/*.zip" />
	</target>
    <target name="clean">
        <delete dir="${artifacts.dir}" quiet="true"/>
    </target>
    <target name="build">
    	<antcall target="gather-artifacts" />
    	<antcall target="zip-artifacts" />
	</target>
    <target name="clean-build" depends="clean, build" />    
    <target name="test">
        <echo message="Project ${ant.project.name} doesn't have any tests" />
    </target>
</project>
